<template>
  <el-descriptions
      title="供应商信息"
      direction="vertical"
      border
      style="margin-top: 20px"
  >
    <el-descriptions-item label="用户ID">{{ userInfo.supplierId }}</el-descriptions-item>
    <el-descriptions-item label="用户名">{{ userInfo.boosName }}</el-descriptions-item>
    <el-descriptions-item label="电话号码">{{ userInfo.phone }}</el-descriptions-item>
    <el-descriptions-item label="商家简介">
      {{ userInfo.introduction }}
    </el-descriptions-item>
  </el-descriptions>
</template>
<script setup>
import {onMounted, ref} from 'vue';
import {supplierTokenStore} from "@/store/tokenStore.js";
import {getSupplierInfo} from "@/api/supplier.js";

const userInfo = ref({
      supplierId: null,
      boosName: "",
      phone: "",
      introduction: ""
    }
)
onMounted(() => {
  if (supplierTokenStore().supplierToken !== '') {
    getUserInfoFirstPage()
  }
});
const getUserInfoFirstPage = async () => {
  userInfo.value = await getSupplierInfo()
}

</script>

<style scoped>

</style>